package com.example.idlefish.PublicModule

import android.content.Intent
import android.os.Build
import java.io.Serializable

class CommonUtil {
    companion object{
        fun<T :Serializable?>getSerializable(intent:Intent, name:String, clazz: Class<T>):T {
            return if(Build.VERSION.SDK_INT  >= Build.VERSION_CODES.TIRAMISU)
                intent.getSerializableExtra(name, clazz)!!
            else
                intent.getSerializableExtra(name) as T

        }
    }
}